<template>
    <div class="flip">
         <a-space>
            <a-button type="primary" @click="changeName">修改姓名</a-button>
            <a-button>欢迎光临</a-button>
            <a-button type="dashed">好走不送</a-button>
            <a-button type="outline">Outline</a-button>
            <a-button type="text">Text</a-button>
            {{ userStore.name }}
        </a-space>
    </div>
</template>

<script setup lang="ts">
// 分别引入各模块store
import { useCounterStore } from '../store/counter'
// 分别引入各模块store
import { useUserStore } from '../store/user'
import { ref, toRefs, reactive, computed, watch, onMounted } from 'vue'
// 获取模块里定义的变量 aciton 等
const counterStore = useCounterStore()
console.log(counterStore)
// 获取模块里定义的变量 aciton 等
const userStore = useUserStore()
console.log(userStore)
// 修改姓名
const changeName = () => {
    //  就直接掉aciton 就该他
    userStore.updateName('你爹来了')
}
</script>

<style scoped lang="less"></style>
